﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wekit.Model.Auth;

namespace Wekit.Web.Security
{
    public interface IFormsAuthenticationService
    {
        /// <summary>
        /// 用户登录函数
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="createPersistentCookie"></param>
        void SignIn(string userName, bool createPersistentCookie);
        /// <summary>
        /// 用户注销函数
        /// </summary> 
         void SignOut();

        /// <summary>
        /// 判断用户是否拥有权限
        /// </summary>
        /// <param name="user"></param>
        /// <param name="role"></param>
        /// <returns></returns>
        bool isUserInRole(User user,Role role);
    }
}
